/**
* Created with CLion.
* User:Lenovo
* Date:2023-05-18
* Time:16:39
* Description:
*/
#ifndef AWA_QUEUE_H
#define AWA_QUEUE_H

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>

typedef int QDataType;

typedef struct QueueNode
{
    QDataType data;
    struct QueueNode *next;
} QNode;

typedef struct Queue
{
    QNode *pHead;
    QNode *pTail;
    int size;
} Queue;

void QueueInit(Queue *pq);
void QueueDestroy(Queue *pq);
void QueuePush(Queue *pq, QDataType x);
void QueuePop(Queue *pq);
QDataType QueueFront(Queue *pq);
QDataType QueueBack(Queue *pq);
int QueueSize(Queue *pq);
bool QueueEmpty(Queue *pq);

#endif //AWA_QUEUE_H
